<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets">

<h:head></h:head>
<h:body>
	<h:form>
		<rich:panel style="width:500px">
			<f:facet name="header">Purchase Order</f:facet>
			<rich:tabPanel switchType="ajax" activeItem="n">
				<rich:tab header="New" name="n">
					<rich:dataGrid
						value="#{purchaseOrderPagesController.newPOListBuyerView}"
						var="npo" columns="3" width="600px" border="0">
						<rich:panel>
							<f:facet name="Header">
								<h:outputText value="Purchase Order Grid" />
							</f:facet>
							<h:panelGrid columns="2">
								<h:outputText value="ID:" />
								<h:outputText value="#{npo.poid}" />
								<h:outputText value="Purchase Order Doc No:" />
								<h:outputText value="#{npo.purchaseorderdocno}" />
								<h:outputText value="Buyer:" />
								<h:outputText value="#{npo.author.userid}" />
								<h:outputText value="Seller:" />
								<h:outputText value="#{npo.seller.userid}" />
								<h:outputText value="Status:" />
								<h:outputText value="#{npo.status}" />
								<h:commandLink
									action="#{purchaseOrderPagesController.getPODetailById}"
									value="Details">
									<f:param name="id" value="#{npo.poid}"></f:param>
								</h:commandLink>
							</h:panelGrid>
						</rich:panel>
					</rich:dataGrid>
				</rich:tab>
				<rich:tab header="Accepted" name="a">
					<rich:dataGrid
						value="#{purchaseOrderPagesController.acceptedPOListBuyerView}"
						var="apo" columns="3" width="600px" border="0">
						<rich:panel>
							<f:facet name="Header">
								<h:outputText value="Purchase Order Grid" />
							</f:facet>
							<h:panelGrid columns="2">
								<h:outputText value="ID:" />
								<h:outputText value="#{apo.poid}" />
								<h:outputText value="Purchase Order Doc No:" />
								<h:outputText value="#{apo.purchaseorderdocno}" />
								<h:outputText value="Buyer:" />
								<h:outputText value="#{apo.author.userid}" />
								<h:outputText value="Seller:" />
								<h:outputText value="#{apo.seller.userid}" />
								<h:outputText value="Status:" />
								<h:outputText value="#{apo.status}" />
								<h:commandLink
									action="#{purchaseOrderPagesController.getPODetailById}"
									value="Details">
									<f:param name="id" value="#{apo.poid}"></f:param>
								</h:commandLink>
							</h:panelGrid>
						</rich:panel>
					</rich:dataGrid>
				</rich:tab>
				<rich:tab header="Rejected" name="r">
					<rich:dataGrid
						value="#{purchaseOrderPagesController.rejectedPOListBuyerView}"
						var="rpo" columns="3" width="600px" border="0">
						<rich:panel>
							<f:facet name="Header">
								<h:outputText value="Purchase Order Grid" />
							</f:facet>
							<h:panelGrid columns="2">
								<h:outputText value="ID:" />
								<h:outputText value="#{rpo.poid}" />
								<h:outputText value="Purchase Order Doc No:" />
								<h:outputText value="#{rpo.purchaseorderdocno}" />
								<h:outputText value="Buyer:" />
								<h:outputText value="#{rpo.author.userid}" />
								<h:outputText value="Seller:" />
								<h:outputText value="#{rpo.seller.userid}" />
								<h:outputText value="Status:" />
								<h:outputText value="#{rpo.status}" />
								<h:commandLink
									action="#{purchaseOrderPagesController.getPODetailById}"
									value="Details">
									<f:param name="id" value="#{rpo.poid}"></f:param>
								</h:commandLink>
							</h:panelGrid>
						</rich:panel>
					</rich:dataGrid>
				</rich:tab>
			</rich:tabPanel>
		</rich:panel>
	</h:form>
</h:body>
</html>
